<template>
  <div>
    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
    <div ref="chart" style="width: 100%; height: 400px"></div>
  </div>
</template>
  
<script setup>
import { ref, reactive, onMounted } from "vue";
import * as echarts from "echarts"; //引入 echarts 核心模块
import 'echarts-gl';

const chart = ref();
const lists = ref([]);

onMounted(() => {
  chartInit();
});
const chartInit = () => {
  const myChart = echarts.init(chart.value);

  const option = {
    backgroundColor:'#000',
    globe:{
      baseTexture: 'src/assets/img/earth.jpg',//地球的纹理
    }
  };
  myChart.setOption(option);
};
</script>
  
  <style scoped>
</style>
  